<!DOCTYPE html>
<html lang="en">
  <head>
    <title>ClaimsStandardJWT Class Reference</title>
    <link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
    <link rel="stylesheet" type="text/css" href="../css/highlight.css" />
    <meta charset="utf-8">
    <script src="../js/jquery.min.js" defer></script>
    <script src="../js/jazzy.js" defer></script>
    
    <script src="../js/lunr.min.js" defer></script>
    <script src="../js/typeahead.jquery.js" defer></script>
    <script src="../js/jazzy.search.js" defer></script>
  </head>
  <body>

    <a name="//apple_ref/swift/Class/ClaimsStandardJWT" class="dashAnchor"></a>

    <a title="ClaimsStandardJWT Class Reference"></a>

    <header class="header">
      <p class="header-col header-col--primary">
        <a class="header-link" href="../index.html">
          SwiftJWT 3.6.200 Docs
        </a>
         (100% documented)
      </p>
    
      <p class="header-col--secondary">
        <form role="search" action="../search.json">
          <input type="text" placeholder="Search documentation" data-typeahead>
        </form>
      </p>
    
        <p class="header-col header-col--secondary">
          <a class="header-link" href="https://github.com/Kitura/Swift-JWT/">
            <img class="header-icon" src="../img/gh.png"/>
            View on GitHub
          </a>
        </p>
    
    </header>

    <p class="breadcrumbs">
      <a class="breadcrumb" href="../index.html">SwiftJWT Reference</a>
      <img class="carat" src="../img/carat.png" />
      ClaimsStandardJWT Class Reference
    </p>

    <div class="content-wrapper">
      <nav class="navigation">
        <ul class="nav-groups">
          <li class="nav-group-name">
            <a class="nav-group-name-link" href="../Classes.html">Classes</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Classes/ClaimsMicroProfile.html">ClaimsMicroProfile</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Classes/ClaimsOpenID.html">ClaimsOpenID</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Classes/ClaimsStandardJWT.html">ClaimsStandardJWT</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Classes/JWTDecoder.html">JWTDecoder</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Classes/JWTEncoder.html">JWTEncoder</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a class="nav-group-name-link" href="../Protocols.html">Protocols</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Protocols/Claims.html">Claims</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a class="nav-group-name-link" href="../Structs.html">Structures</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Structs/AddressClaim.html">AddressClaim</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Structs/Header.html">Header</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Structs/JWT.html">JWT</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Structs/JWTError.html">JWTError</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Structs/JWTSigner.html">JWTSigner</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Structs/JWTVerifier.html">JWTVerifier</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Structs/ValidateClaimsResult.html">ValidateClaimsResult</a>
              </li>
            </ul>
          </li>
        </ul>
      </nav>
      <article class="main-content">

        <section class="section">
          <div class="section-content top-matter">
            <h1>ClaimsStandardJWT</h1>
              <div class="declaration">
                <div class="language">
                  
                  <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">class</span> <span class="kt">ClaimsStandardJWT</span> <span class="p">:</span> <span class="kt"><a href="../Protocols/Claims.html">Claims</a></span></code></pre>

                </div>
              </div>
            <p>A class representing the Standard JWT claims as described in <a href="https://tools.ietf.org/html/rfc7519#section-4.1">RFC7519</a>.</p>

          </div>
        </section>

        <section class="section">
          <div class="section-content">
            <div class="task-group">
              <ul class="item-container">
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:8SwiftJWT014ClaimsStandardB0C3iss3sub3aud3exp3nbf3iat3jtiACSSSg_AKSaySSGSg10Foundation4DateVSgA2qKtcfc"></a>
                    <a name="//apple_ref/swift/Method/init(iss:sub:aud:exp:nbf:iat:jti:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:8SwiftJWT014ClaimsStandardB0C3iss3sub3aud3exp3nbf3iat3jtiACSSSg_AKSaySSGSg10Foundation4DateVSgA2qKtcfc">init(iss:<wbr>sub:<wbr>aud:<wbr>exp:<wbr>nbf:<wbr>iat:<wbr>jti:<wbr>)</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Initialize a <code>ClaimsStandardJWT</code></p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="nf">init</span><span class="p">(</span>
    <span class="nv">iss</span><span class="p">:</span> <span class="kt">String</span><span class="p">?</span> <span class="o">=</span> <span class="kc">nil</span><span class="p">,</span>
    <span class="nv">sub</span><span class="p">:</span> <span class="kt">String</span><span class="p">?</span> <span class="o">=</span> <span class="kc">nil</span><span class="p">,</span>
    <span class="nv">aud</span><span class="p">:</span> <span class="p">[</span><span class="kt">String</span><span class="p">]?</span> <span class="o">=</span> <span class="kc">nil</span><span class="p">,</span>
    <span class="nv">exp</span><span class="p">:</span> <span class="kt">Date</span><span class="p">?</span> <span class="o">=</span> <span class="kc">nil</span><span class="p">,</span>
    <span class="nv">nbf</span><span class="p">:</span> <span class="kt">Date</span><span class="p">?</span> <span class="o">=</span> <span class="kc">nil</span><span class="p">,</span>
    <span class="nv">iat</span><span class="p">:</span> <span class="kt">Date</span><span class="p">?</span> <span class="o">=</span> <span class="kc">nil</span><span class="p">,</span>
    <span class="nv">jti</span><span class="p">:</span> <span class="kt">String</span><span class="p">?</span> <span class="o">=</span> <span class="kc">nil</span>
    <span class="p">)</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:8SwiftJWT014ClaimsStandardB0C3issSSSgvp"></a>
                    <a name="//apple_ref/swift/Property/iss" class="dashAnchor"></a>
                    <a class="token" href="#/s:8SwiftJWT014ClaimsStandardB0C3issSSSgvp">iss</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>The &ldquo;iss&rdquo; (issuer) claim identifies the principal that issued the
JWT.  The processing of this claim is generally application specific.
The &ldquo;iss&rdquo; value is a case-sensitive.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">iss</span><span class="p">:</span> <span class="kt">String</span><span class="p">?</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:8SwiftJWT014ClaimsStandardB0C3subSSSgvp"></a>
                    <a name="//apple_ref/swift/Property/sub" class="dashAnchor"></a>
                    <a class="token" href="#/s:8SwiftJWT014ClaimsStandardB0C3subSSSgvp">sub</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>The &ldquo;sub&rdquo; (subject) claim identifies the principal that is the
subject of the JWT.  The claims in a JWT are normally statements
about the subject.  The subject value MUST either be scoped to be
locally unique in the context of the issuer or be globally unique.
The processing of this claim is generally application specific.  The
&ldquo;sub&rdquo; value is case-sensitive.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">sub</span><span class="p">:</span> <span class="kt">String</span><span class="p">?</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:8SwiftJWT014ClaimsStandardB0C3audSaySSGSgvp"></a>
                    <a name="//apple_ref/swift/Property/aud" class="dashAnchor"></a>
                    <a class="token" href="#/s:8SwiftJWT014ClaimsStandardB0C3audSaySSGSgvp">aud</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>The &ldquo;aud&rdquo; (audience) claim identifies the recipients that the JWT is
intended for.  Each principal intended to process the JWT MUST
identify itself with a value in the audience claim.  If the principal
processing the claim does not identify itself with a value in the
&ldquo;aud&rdquo; claim when this claim is present, then the JWT MUST be
rejected. The interpretation of audience values is generally application specific.
The &ldquo;aud&rdquo; value is case-sensitive.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">aud</span><span class="p">:</span> <span class="p">[</span><span class="kt">String</span><span class="p">]?</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:8SwiftJWT014ClaimsStandardB0C3exp10Foundation4DateVSgvp"></a>
                    <a name="//apple_ref/swift/Property/exp" class="dashAnchor"></a>
                    <a class="token" href="#/s:8SwiftJWT014ClaimsStandardB0C3exp10Foundation4DateVSgvp">exp</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>The &ldquo;exp&rdquo; (expiration time) claim identifies the expiration time on
or after which the JWT MUST NOT be accepted for processing.  The
processing of the &ldquo;exp&rdquo; claim requires that the current date/time
MUST be before the expiration date/time listed in the &ldquo;exp&rdquo; claim.
Implementers MAY provide for some small leeway, usually no more than
a few minutes, to account for clock skew.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">exp</span><span class="p">:</span> <span class="kt">Date</span><span class="p">?</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:8SwiftJWT014ClaimsStandardB0C3nbf10Foundation4DateVSgvp"></a>
                    <a name="//apple_ref/swift/Property/nbf" class="dashAnchor"></a>
                    <a class="token" href="#/s:8SwiftJWT014ClaimsStandardB0C3nbf10Foundation4DateVSgvp">nbf</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>The &ldquo;nbf&rdquo; (not before) claim identifies the time before which the JWT
MUST NOT be accepted for processing.  The processing of the &ldquo;nbf&rdquo;
claim requires that the current date/time MUST be after or equal to
the not-before date/time listed in the &ldquo;nbf&rdquo; claim.  Implementers MAY
provide for some small leeway, usually no more than a few minutes, to
account for clock skew.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">nbf</span><span class="p">:</span> <span class="kt">Date</span><span class="p">?</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:8SwiftJWT014ClaimsStandardB0C3iat10Foundation4DateVSgvp"></a>
                    <a name="//apple_ref/swift/Property/iat" class="dashAnchor"></a>
                    <a class="token" href="#/s:8SwiftJWT014ClaimsStandardB0C3iat10Foundation4DateVSgvp">iat</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>The &ldquo;iat&rdquo; (issued at) claim identifies the time at which the JWT was
issued.  This claim can be used to determine the age of the JWT.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">iat</span><span class="p">:</span> <span class="kt">Date</span><span class="p">?</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:8SwiftJWT014ClaimsStandardB0C3jtiSSSgvp"></a>
                    <a name="//apple_ref/swift/Property/jti" class="dashAnchor"></a>
                    <a class="token" href="#/s:8SwiftJWT014ClaimsStandardB0C3jtiSSSgvp">jti</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>The &ldquo;jti&rdquo; (JWT ID) claim provides a unique identifier for the JWT.
The identifier value MUST be assigned in a manner that ensures that
there is a negligible probability that the same value will be
accidentally assigned to a different data object; if the application
uses multiple issuers, collisions MUST be prevented among values
produced by different issuers as well.  The &ldquo;jti&rdquo; claim can be used
to prevent the JWT from being replayed.  The &ldquo;jti&rdquo; value is case-
sensitive</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">jti</span><span class="p">:</span> <span class="kt">String</span><span class="p">?</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
              </ul>
            </div>
          </div>
        </section>

      </article>
    </div>
    <section class="footer">
      <p>&copy; 2020 <a class="link" href="https://github.com/Kitura/Swift-JWT" target="_blank" rel="external">IBM &amp; Kitura Project Contributors</a>. All rights reserved. (Last updated: 2020-11-25)</p>
      <p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.6</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
    </section>
  </body>
</div>
</html>
